<#import "/layout.html" as c>
<#import "/list_layout.html" as list>
<#assign alertList = []/>
  <@c.html title="Index">
  <!-- ================== 开始页面级CSS调用 ================== -->
  <link href="${pluginsRoot}bootstrap-wizard/css/bwizard.min.css" rel="stylesheet"/>
  <!-- 日历控件 -->
  <link href="${pluginsRoot}/jquery.dtGrid/dependents/datePicker/skin/WdatePicker.css" rel="stylesheet"/>
  <link href="${pluginsRoot}/jquery.dtGrid/dependents/datePicker/skin/default/datepicker.css" rel="stylesheet"/>
  <!-- ================== 结束页面级CSS调用 ================== -->
  <@list.html title="参数列表" subTitle="后台参数管理" alertList=alertList permi="sys:config:save" addBtn=true searchHint="请输入参数名进行搜索">

    <!-- 开始用户权限参数 -->
    <@shiro.hasPermission name="sys:config:edit">
      <input type="hidden" id="editPermi" value="1"/>
    </@shiro.hasPermission>
    <@shiro.hasPermission name="sys:config:del">
      <input type="hidden" id="delPermi" value="1"/>
    </@shiro.hasPermission>
    <!-- 结束用户权限参数 -->

    <!-- 开启新增参数模态窗口 -->
    <div class="modal fade" id="addModal" tabindex="-1" role="dialog">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h4 class="modal-title"> 新增参数 <a class="btn btn-info btn-xs m-l-10" role="button" data-toggle="collapse" href="#OperationTipsAdd" aria-expanded="true" title="操作提示"> <i class="fa fa-exclamation"></i> &nbsp;提示 </a> </h4>
          </div>
          <div class="modal-body">
            <form id="addForm" autocomplete="off" action="${adminRoot}config/json/add" method="post" data-parsley-validate="true">
              <div class="form-group">
                <label class="control-label">参数类型&nbsp;: </label>
                <select name="type" class="form-control" data-parsley-required="true" >
                  <option value ="">- 请选择 -</option>
                  <option value ="1">系统底层配置</option>
                  <option value ="2">费率信息配置</option>
                  <option value ="3">邮件/短信配置</option>
                  <option value ="4">三方接口配置</option>
                  <option value ="5">附属信息配置</option>
                </select>
              </div>
              <div class="form-group">
                <label class="control-label">参数名称 <i class="f-s-14 text-danger">*</i>&nbsp;: </label>
                <input type="text" name="name" class="form-control" placeholder="请输入参数名称" data-tip="tooltip" data-placement="auto" data-original-title="必填项，3-20个字。" data-parsley-required="true" data-parsley-length="[3,20]"/>
              </div>
              <div class="form-group">
                <label class="control-label">参数标识 <i class="f-s-14 text-danger">*</i>&nbsp;: </label>
                <input type="text" name="nid" class="form-control" placeholder="请输入参数唯一标识" data-tip="tooltip" data-placement="auto" data-original-title="必填项，3-50个字。" data-parsley-required="true" data-parsley-length="[3,50]"/>
              </div>
              <div class="form-group">
                <label class="control-label">参数值 <i class="f-s-14 text-danger">*</i>&nbsp;: </label>
                <input type="text" name="value" class="form-control" placeholder="请输入参数值" data-tip="tooltip" data-placement="auto"  data-parsley-required="true" data-parsley-length="[1,100]"/>
              </div>

              <div class="form-group">
                <label class="control-label"> 状态<i class="f-s-14 text-danger">*</i> &nbsp;: </label>
                <div>
                  <input type="checkbox" class="status" autocomplete="off"
                         data-input-name="status"
                         data-size="small"
                         data-on-color="primary"
                         data-on-text="是"
                         data-off-text="否"
                         data-input-true="1"
                         data-input-false="0" />
                </div>
              </div>
              <div class="form-group">
                <label class="control-label">参数描述 <i class="f-s-14 text-danger">*</i> &nbsp;: </label>
                <input type="text" name="remark" class="form-control" placeholder="请输入参数描述" data-tip="tooltip" data-placement="auto"  data-parsley-required="false" data-original-title="参数描述不能超过100字" data-parsley-length="[0,200]"/>
              </div>
            </form>
          </div>
          <div class="modal-footer"> <a href="javascript:;" class="btn btn-white" data-dismiss="modal">放弃操作</a> <a href="javascript:;" class="btn btn-primary" data-loading-text="Loading..." nc-ajax-submit-target="addForm" nc-ajax-submit>确认提交</a> </div>
        </div>
      </div>
    </div>
    <!-- 结束新增参数模态窗口 -->

    <!-- 开启编辑参数模态窗口 -->
    <div class="modal fade" id="editModal" tabindex="-1" role="dialog">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h4 class="modal-title"> 参数管理 <a class="btn btn-info btn-xs m-l-10" role="button" data-toggle="collapse" href="#OperationTipsAdd" aria-expanded="true" title="操作提示"> <i class="fa fa-exclamation"></i> &nbsp;提示 </a> </h4>
          </div>
          <div class="modal-body">
            <ul class="text-info p-b-15 p-l-15 collapse in" role="tabpanel" id="OperationTipsAdd">
              <!--<li class="m-b-3">如需修改密码请填写登录密码和重复密码，否则密码处请留空</li>-->
            </ul>
            <form id="editForm" autocomplete="off" action="${adminRoot}config/json/edit" method="post" data-parsley-validate="true">
              <input type="hidden" id="id" name="id"/>
              <div class="form-group">
                <label class="control-label">参数类型&nbsp;: </label>
                <select name="type" id="type" class="form-control" data-parsley-required="true" >
                  <option value ="">- 请选择 -</option>
                  <option value ="1">系统底层配置</option>
                  <option value ="2">费率信息配置</option>
                  <option value ="3">邮件/短信配置</option>
                  <option value ="4">三方接口配置</option>
                  <option value ="5">附属信息配置</option>
                </select>
              </div>
              <div class="form-group">
                <label class="control-label">参数名称 <i class="f-s-14 text-danger">*</i>&nbsp;: </label>
                <input type="text" name="name" id="name" class="form-control" placeholder="请输入参数名称" data-tip="tooltip" data-placement="auto" data-original-title="必填项，3-20个字。" data-parsley-required="true" data-parsley-length="[3,20]"/>
              </div>
              <div class="form-group">
                <label class="control-label">参数标识 <i class="f-s-14 text-danger">*</i>&nbsp;: </label>
                <input type="text" name="nid" id="nid" class="form-control" placeholder="请输入参数唯一标识" data-tip="tooltip" data-placement="auto" data-original-title="必填项，3-50个字。" data-parsley-required="true" data-parsley-length="[3,50]"/>
              </div>
              <div class="form-group">
                <label class="control-label">参数值 <i class="f-s-14 text-danger">*</i>&nbsp;: </label>
                <input type="text" name="value" id="value" class="form-control" placeholder="请输入参数值" data-tip="tooltip" data-placement="auto"  data-parsley-required="true" data-parsley-length="[1,100]"/>
              </div>
              <div class="form-group">
                <label class="control-label"> 状态<i class="f-s-14 text-danger">*</i> &nbsp;: </label>
                <div>
                  <input type="checkbox" class="status" autocomplete="off"
                         data-input-name="status"
                         data-size="small"
                         data-on-color="primary"
                         data-on-text="是"
                         data-off-text="否"
                         data-input-true="1"
                         data-input-false="0"
                         checked/>
                </div>
              </div>
              <div class="form-group">
                <label class="control-label">参数描述 <i class="f-s-14 text-danger">*</i> &nbsp;: </label>
                <input type="text" name="remark" id="remark" class="form-control" placeholder="请输入参数描述" data-tip="tooltip" data-placement="auto"  data-parsley-required="false" data-original-title="参数描述不能超过100字" data-parsley-length="[0,200]"/>
              </div>
            </form>
          </div>
          <div class="modal-footer"> <a href="javascript:;" class="btn btn-white" data-dismiss="modal">放弃操作</a> <a href="javascript:;" class="btn btn-primary" data-loading-text="Loading..." nc-ajax-submit-target="editForm" nc-ajax-submit>确认提交</a> </div>
        </div>
      </div>
    </div>
    <!-- 结束编辑参数模态窗口 -->

  </@list.html>
  <!-- ================== 开始页面级JavaScrip调用 ================== -->
  <script src="${pluginsRoot}bootstrap-wizard/js/bwizard.js"></script>
  <!-- 表单checkbox项 -->
  <script src="${pluginsRoot}bootstrap-switch/bootstrap-switch.min.js"></script>
  <!-- 日历控件 -->
  <script src="${pluginsRoot}/jquery.dtGrid/dependents/datePicker/WdatePicker.js" defer="defer"></script>
  <script src="${jsRoot}setting/config.handle.js"></script>
  <!-- ================== 结束页面级JavaScrip调用 ================== -->
</@c.html>
